package com.duguo.dynamicmvc.factory.processor.controller;

import java.util.Map;

import javassist.CtClass;
import javassist.CtMethod;

import com.duguo.dynamicmvc.factory.ControllerBuilder;
import com.duguo.dynamicmvc.factory.WorkingModel;

public interface ControllerMethodCreator {

	public CtMethod getHanderCtMethodFromParent(String parentControllerClassName) throws Exception;

	public CtClass getInternalInterface(CtMethod targetCtMethod) throws Exception;

	public Class getStaticControllerClass(CtMethod targetCtMethod, CtClass staticModelCtClass, CtClass parentControllerCtClass, String controllerName, ControllerBuilder controllerBuilder, ControllerClassCreator controllerClassCreator) throws Exception;

	public void createMultiActionHandlerMethod(CtClass controllerCtClass, CtClass controllerInternalInterface, CtMethod controllerHandlerCtMethod, boolean hasDynamicController, Map<String,Object> viewMappings, boolean isSingleAction, ControllerBuilder controllerBuilder) throws Exception;

	public void createDynamicHandlerMethod(CtClass controllerCtClass, CtMethod parentHandlerCtMethod, ControllerProcessor controllerProcessor) throws Exception;

	public void createInternalMethodControllerHandlerMethod(WorkingModel workingModel, CtClass internalControllerClass, CtMethod controllerMethodCtMethod, ControllerBuilder controllerBuilder) throws Exception;

	public void createStaticViewControllerHandlerMethod(CtClass controllerCtClass, CtMethod handlerCtMethod, CtClass staticModelCtClass, ControllerBuilder controllerBuilder) throws Exception;

	public void createControllerRegisterMethod(CtClass targetClass) throws Exception;

	public void createViewRegisterMethod(CtClass targetClass) throws Exception;

}
